<script setup lang="ts">
interface Props {
  title: string;
  dark?: boolean;
}
const props = withDefaults(defineProps<Props>(), { dark: false });
</script>

<template>
  <div class="model-title-com" :class="{ 'model-title-com-dark': dark }">
    <div class="title-text">{{ title }}</div>
    <div class="title-slot"><slot /></div>
  </div>
</template>

<style lang="scss" scoped>
.model-title-com {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 32px;
  background: #f7f7f7;
  // background: linear-gradient(90deg, var(--px-color-primary-light-9), #fff);
  // border-left: 4px solid var(--px-color-primary);

  .title-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    color: #333;
    text-indent: 8px;
    // letter-spacing: 2px;
    user-select: none;
  }
}

.model-title-com-dark {
  background: linear-gradient(90deg, #062e51ff, #001e3bff);

  .title-text {
    color: #fff;
  }
}
</style>
